package com.ml.doctor.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by kun on 17/12/5.
 */

public class CityBean {
    /**
     * province : [{"id":"330000","name":"浙江省","code":"330000","cities":[{"id":"330100","name":"杭州市","code":"330100","districts":[{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"}]}]}]
     */

    private List<ProvinceEntity> province;

    public void setProvince(List<ProvinceEntity> province) {
        this.province = province;
    }

    public List<ProvinceEntity> getProvince() {
        if (province == null)
            province = new ArrayList<>();
        return province;
    }

    public static class ProvinceEntity {
        /**
         * id : 330000
         * name : 浙江省
         * code : 330000
         * cities : [{"id":"330100","name":"杭州市","code":"330100","districts":[{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"}]}]
         */

        public String id;
        public String name;
        public String code;
        public List<CitiesEntity> cities;


        public List<CitiesEntity> getCities() {
            if (cities == null)
                cities = new ArrayList<>();
            return cities;
        }

        public static class CitiesEntity {
            /**
             * id : 330100
             * name : 杭州市
             * code : 330100
             * districts : [{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"},{"id":"230100","name":"哈尔滨市","code":"230100"}]
             */

            public String id;
            public String name;
            public String code;
            private List<DistrictsEntity> districts;


            public List<DistrictsEntity> getDistricts() {
                if (districts == null)
                    districts = new ArrayList<>();
                return districts;
            }

            public static class DistrictsEntity {
                /**
                 * id : 230100
                 * name : 哈尔滨市
                 * code : 230100
                 */

                public String id;
                public String name;
                public String code;


            }
        }
    }
}
